/* 基础样式 */
body {
    margin: 0;
    padding: 0;
    height: 100%;
}


html {
    overflow: hidden;
}


/* 隐藏滚动条但仍允许滚动 */
body::-webkit-scrollbar {
  display: none !important;
}
body {
  -ms-overflow-style: none !important; /* IE 10+ */
  scrollbar-width: none !important;   /* Firefox */
}


// 右侧
#app {
    height: 100%;

    .sidebar {
        // width: auto;
        max-width: 15vw;
    }

    .main-container {
        width: 99vw;
        //    background-color: #ff6918;
    }

    .main-content {
        padding: 0px;
        margin: 0px ;
        overflow-y: hidden;
        max-width: 100vw;
        overflow-x: hidden;
        padding: 10px 0 0px 0 !important;
        // margin-bottom: 10px;
        z-index: +2;
        background-color: #f5f7fa;

        .home-view {
            overflow-y: auto;
            scrollbar-width: none;
            /* Firefox */
            -ms-overflow-style: none;
            // 针对 Firefox
            // scrollbar-width: thin !important; // 滚动条变细
            scrollbar-color: rgba(0, 0, 0, 0.3) transparent !important; // 滑块颜色和轨道颜色
            border-radius: 0.5rem !important;
            /* IE 10+ */

            padding: 0 6px 20px 10px;
            height: 100vh;
            width: 98%;
            
            margin: 0 auto;
            

            // 针对 Chrome、Safari 和 Edge
            &::-webkit-scrollbar {
                display: none;
                /* Chrome, Safari 和 Edge 隐藏滚动条 */
                width: 2px !important; // 设置竖向滚动条宽度
                height: 4px; // 设置横向滚动条高度
            }

            &::-webkit-scrollbar-track {
                background: transparent; // 滑动轨道背景
            }

            &::-webkit-scrollbar-thumb {
                background: rgba(0, 0, 0, 0.3) !important; // 滑块颜色和透明度
                border-radius: 1px !important; // 圆角滑块
            }

            &::-webkit-scrollbar-thumb:hover {
                background: rgba(0, 0, 0, 0.5) !important; // 鼠标悬停时滑块颜色
            }

            .requirement-form {
                position: relative;
                padding: 0;
                margin: 0;
                width: 100%;
            }

        }

        &.samill-content {
            max-width: 96vw !important;

        }

        &.big-content {
            max-width: 90vw !important;
        }


        
        .message-container .message .message-content{
          max-width: 90% !important;
        }
        
    }
}


.layout-container {
    height: 100vh;
}

/* PC端样式 */
.el-aside {
    background-color: #001529;
    position: relative;
    transition: width 0.3s;
    overflow: hidden;
}

.logo-container {
    // height: 60px;
    padding: 20px 20PX 20px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    height: 30px;
    width: auto;
    padding-left: 0%;

    &:hover {
        filter: brightness(1.1) saturate(100%) hue-rotate(190deg);
        transform: scale(1.1);
        animation: all 0.3s ease-in-out;
        transition: background-color 0.5s ease;
        /* 背景颜色过渡持续 0.5 秒 */
    }
}

// 侧边栏样式
#app .el-container {
    aside {
        .sidebar-menu {
            border: none;
            background-color: transparent;
        }

        .el-menu {
            border-right: none !important;

            .el-menu-item {
                color: #fff;
                text-align: center;

                &.is-active {
                    background-color: #188fff1b !important;
                    color: #ffffffa0;
                }

                &:hover {
                    background-color: #188fff1b !important;
                    color: #1c73ffcf;
                }
            }
        }

        // 左侧菜单栏伸缩按钮
        .collapse-btn {
            position: absolute;
            bottom: 10px;
            right: 0px;
            transform: translateX(-50%);
            color: #fff;
            cursor: pointer;
            padding: 8px;
            border-radius: 4px;
            background: rgba(255, 255, 255, 0.1);

            &:hover {
                background-color: rgba(24, 143, 255, 0.1058823529);

                path {
                    fill: #0a83fc;
                }
            }

            .el-icon {
                padding: 0;
                margin: 0;
                font-size: 1.5rem;

                svg {
                    path {
                        font-size: 1em;
                    }
                }
            }
        }

        &.big-aside {
            .logo-img {
                height: 30px;
            }


        }

        &.samill-aside {
            .logo-img {
                height: 20px;
            }
            .collapse-btn {
             color: #fff; 
            }
        }
    }


}

/* 移动端菜单按钮默认隐藏 */
.mobile-menu-toggle {
    position: fixed;
    top: 10px;
    left: 10px;
    right: auto;
    z-index: 1000;
    transition: all 0.3s ease;
}

.big-aside .mobile-menu-toggle {
    left: auto;
    right: 10px;
}

// Ensure smooth transition when sidebar is open or closed
.mobile-menu-toggle {
    transition: all 0.3s ease;
}

.footer {
    text-align: center;
    font-size: 10px;
    color: grey;
    line-height: 30px;

    a {
        color: gray;

        &:hover {
            color: #409eff;
        }
    }
}

/* 移动端适配 */
@media screen and (max-width: 768px),
(orientation: portrait) {
    * {
        overflow: hidden;
    }

    .mobile-menu-toggle {
        display: block;
        position: fixed;
        top: 10px;
        z-index: 1100;
        background: rgba(255, 255, 255, 0.9);
        padding: 8px;
        border-radius: 4px;
        box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
        width: 1rem;
        height: 1.1rem;
        min-height: 25px;
        line-height: 1.1rem;
        min-width: 25px;
        left: 10px;
        cursor: pointer;
        transition: transform 0.3s ease; // 使用 transform 过渡

        &:hover {
            background-color: #f0f0f0;
        }

        // 当侧边栏展开时
        &.sidebar-expanded {
            transform: translateX(calc(100vw - 100% - 20px)); // 移动到右侧
        }
    }

    .mobile-aside {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 999;
        transition: transform 0.3s ease;
        max-width: 35vw !important;

    }


    .big-aside .mobile-menu-toggle {
        left: auto !important;
        right: 10px !important;
        transition: right 0.3s ease;
    }



    .mobile-aside-hidden {
        transform: translateX(-100%);
    }

    .el-main {
        padding-left: 0;
        padding-top: 50px;
    }

    .collapse-btn {
        // display: none;
    }
}